import request from '@/utils/request'

// 查询网店订单列表
export function listTradingOrder(query) {
  return request({
    url: '/onlineShop/tradingOrder/list',
    method: 'get',
    params: query
  })
}
// 查询个人网店订单列表
export function myListTradingOrder(query) {
  return request({
    url: '/onlineShop/tradingOrder/myList',
    method: 'get',
    params: query
  })
}

// 查询网店订单详细
export function getTradingOrder(id) {
  return request({
    url: '/onlineShop/tradingOrder/' + id,
    method: 'get'
  })
}

// 新增网店订单
export function addTradingOrder(data) {
  return request({
    url: '/onlineShop/tradingOrder',
    method: 'post',
    data: data
  })
}

// 修改网店订单
export function updateTradingOrder(data) {
  return request({
    url: '/onlineShop/tradingOrder',
    method: 'put',
    data: data
  })
}

// 删除网店订单
export function delTradingOrder(id) {
  return request({
    url: '/onlineShop/tradingOrder/' + id,
    method: 'delete'
  })
}
export function deleteTradingOrderById(id) {
  return request({
    url: '/onlineShop/tradingOrder/deleteTradingOrderById/' + id,
    method: 'delete'
  })
}
